from socket import *

HOST = '192.168.40.32'
PORT = 9999

s = socket(AF_INET, SOCK_DGRAM)
s.bind((HOST, PORT))

while True:
    data, address = s.recvfrom(1024)
    print(data, address)
    s.sendto('this is the UDP server'.encode('utf-8'), address)